// dOOdad - Object-oriented programming framework for Javascript
// File: Debug.js - Debug file
// Project home: https://sourceforge.net/projects/doodad-js/
// Author: Claude Petit, Quebec city
// Copyright @ 2015

if (!window.Doodad) {
	Doodad = {
		parent: null,
	};
};

Doodad.scriptsBefore = Doodad.scriptsBefore || [];
Doodad.scriptsBefore.push(
	{
		description: "Enable asserts", // for debug only
		dependencies : [
			{
				conditions: {
					include: [
						'Doodad.Tools.initialized'
					],
					exclude: [
					],
					optional: true,
				},
				scripts: [
				],
				initializers: [
					'Doodad.Tools.enableAsserts()', 
					'Doodad.Tools.logLevel = Doodad.Tools.LogLevels.Debug;',
					//'alert("asserts")',
				],
			},
		],
	},
	{
		description: "Enable internal stack", // for debug only
		dependencies : [
			{
				conditions: {
					include: [ // "and" conditions
						'Doodad.initialized'
					],
					exclude: [ // "or" conditions
					],
					optional: true,
				},
				scripts: [
				],
				initializers: [
					'Doodad.Stack.enable()', 
					//'alert("stack")',
				],
			},
		],
	}
);
